home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue15 / source / example-4b.rib < prev   
Encoding:
Text File  |  2002-08-14  |  1.2 KB  |  56 lines

  1. #########################################
  2. # Working Example 1c for Linux Gazette
  3. # By Paul M. Sargent (8th Feb 1997)
  4. #########################################
  5.  
  6. # First we setup the output file 
  7. Display "Example_1c.tiff" "file" "rgb"
  8.  
  9. # Then set the x & y resolution of the image and the pixel aspect
  10. # ratio (1 = square pixels)
  11. Format 300 300 1
  12.  
  13. # We now setup the camera (projection type and field of view)
  14. Projection "perspective" "fov" 20
  15.  
  16. # Move the camera into position
  17. Identity
  18. Translate 0 0 10
  19.  
  20. # Start Describing the Scene
  21. WorldBegin
  22.  
  23. # Add the Lightsources
  24.   Attribute "light" "shadows" "on"
  25.   LightSource "spotlight" 1 "from" [1 3 -4] "to" [0 0 0] "intensity" 15
  26.   LightSource "spotlight" 1 "from" [-4 4 -1] "to" [0 0 0] "intensity" 15
  27.   
  28. # Start our first object
  29.   AttributeBegin
  30.     Surface "glass"
  31.     Displacement "stucco"
  32.     Sphere 1 1 -1 360
  33.   AttributeEnd
  34.  
  35. # Put a Floor in.
  36.   AttributeBegin
  37.     Surface "wood2"
  38.     Patch "bilinear" "P" [-5 -1 -10  
  39.                            5 -1 -10  
  40.                 -5 -1  5  
  41.                5 -1  5]
  42.   AttributeEnd
  43.   
  44. # And a Back Wall  
  45.   AttributeBegin
  46.     Surface "wallpaper_2stripe"
  47.     Patch "bilinear" "P" [-5  10  5 
  48.                            5  10  5  
  49.                 -5 -1   5  
  50.                5 -1   5]
  51.   AttributeEnd
  52.   
  53. # Finished
  54. WorldEnd
  55.  
  56.